<meta charset="UTF-8">
<style>
th{
	text-align:center;
}
td{
	text-align:center;
}
tr{
	cursor:pointer;
}
</style>
<div class="content-wrapper" >
    <!-- Main content -->
    <section class="content">
    	<div class="box box-default">
	     <div class="box-body">
          <div class="row" style="height:600px;">
           <div class="col-md-2">
          <div class="box box-default box-solid">
            <div class="box-header with-border btn" ng-click="showAllEmp()">
            	<div id="corporationTitle">
            		战车餐饮管理公司
            	</div>
              		
			  <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
              </div>
              <!-- /.box-tools -->
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <ul class="nav nav-stacked">   
                <li ng-repeat="dept in depts | orderBy:'code'" style="overflow: overlay;"><a href="" class="btn" ng-click="searchByDept(dept.id)"><i class="fa fa-circle pull-left"></i>{{dept.name}}</a></li>
              </ul>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
            <!-- /.col -->
            <div class="col-md-5">
              	<div class="box" style="border: 0px;">
            <div class="box-header">
              <h3 class="box-title">Table</h3>

              <div class="box-tools">
                <div class="input-group input-group-sm" style="width: 100%;">
                  <input type="text" name="table_search" class="form-control pull-right" placeholder="输入用户姓名、用户名或手机号查询" ng-model="searchUserAccording">

                  <div class="input-group-btn">
                    <button type="button" class="btn btn-default"><i class="fa fa-search"></i></button>
                  </div>
                </div>
              </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding" style="min-height: 407px;">
              <table class="table table-hover">
                <tbody>
                <tr>
                  <th>姓名</th>
                  <th>用户名</th>
                  <th>手机号</th>
                 <!-- <th>操作</th>-->
                </tr>
                <tr ng-repeat="cemp in items" ng-click="showdetail(cemp.id);" id="{{cemp.username}}">
                  <td style="overflow: overlay;">{{cemp.name}}</td>
                  <td style="overflow: overlay;">{{cemp.username}}</td>
                  <td style="overflow: overlay;">{{cemp.telephone}}</td>
                  <!--<th>
                  	<button type="button" class="btn btn-danger" ng-click="send(cemp.id,$event,cemp.name)" ng-show="showorhide(cemp.already)"><i class="fa fa-plus"></i>&nbsp;发卡</button>
                  	<button type="button" class="btn btn-success" ng-hide="showorhide(cemp.already)" ng-click="stopPop($event)">已发卡</button>
                  </th>-->
                </tr>
               </tbody>
              </table>
            </div>
            <!-- /.box-body -->
            <div class="box-footer" style="margin-bottom:10px;">
	              	
	              		<div class="dataTables_info col-md-4" id="example1_info" role="status" aria-live="polite">总条目数：{{totalNums}}</div>
	              		
	                		<div class="col-md-8">
	                			<ul class="pagination pull-right" style="margin: 0px;cursor: pointer;">
		                			<li class="paginate_button previous" id="example1_previous">
		                				<a  ng-click="Previous()">上一页</a>
		                			</li>
		                			<li   ng-repeat="page in pageList" ng-class="{active: isActivePage(page)}"><!-- class=" paginate_button active" -->
		                				<a  ng-click="selectPage(page)">{{page}}</a>
		                			</li>
		                			<li class="paginate_button next" id="example1_next">
		                				<a  ng-click="Next()">下一页</a>
		                			</li>
	                		</ul>
	                		</div>
	                		
	                	
	                
	              </div>
            <div class="box-footer clearfix">
            	<button type="button" class="btn btn-success col-md-4 col-sm-4 col-xs-4 col-md-offset-4 col-xs-offset-4 col-sm-offset-4" ng-click="newUser()"><i class="fa fa-plus pull-left" style="margin-top:3px;" ></i>添加用户</button>
            </div>
          </div>
            </div>
            <!-- /.col  -->
            <div class="col-md-5">
            <!-- 首次进入提示点击 -->
            <div class="box" ng-show="first_div" style="border: 0px; box-shadow: none;">
            	<div class="box-header with-border">
                	<h2>请点击用户查看详情</h2>
                </div>
            </div>
            <!-- 详情预览 -->
            <div class="box" ng-show="detail_div" style="border: 0px;">
                <!-- box header -->
                 <div class="box-header with-border">
                	<button class="btn btn-primary" ng-click="editUser(details[0].employee_code)"><i class="fa fa-edit"></i>&nbsp;编辑</button>
                	<!--<button class="btn bg-olive" ng-click="toggleUser(details[0].id,details[0].is_enabled)" ng-show="!details[0].is_enabled"><i class="fa fa-lock"></i>&nbsp;启用</button>
                	<button class="btn btn-danger" ng-click="toggleUser(details[0].id,details[0].is_enabled)" ng-show="details[0].is_enabled"><i class="fa fa-lock"></i>&nbsp;停用</button>-->
                	<button class="btn btn-danger pull-right" ng-click="showDeleteUser(details[0].id)"><i class="fa fa-close"></i>&nbsp;删除</button>
                </div>
                <form class="form-horizontal">
                <div class="box-body" style="height:400px;overflow:auto;overflow-x:hidden" >
                    <div class="form-group">
                        <label class="col-sm-4 control-label">姓名</label>
                        <div class="col-sm-6">
                            <label class="control-label"  style="text-align:left !important;width：100%" ng-bind="details[0].name">
                            {{details[0].name}}
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-4 control-label">手机号</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].telephone">
                            	{{details[0].telephone}}
                            </label>
                        </div>
                    </div>
                    <!--<div class="form-group">
                        <label class="col-sm-4 control-label">用户类型</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].type=='0'?'内部用户':'外部用户'">
                            	{{details[0].type}}
                            </label>
                        </div>
                    </div>-->
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否为食堂员工</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].internal_user==true?'是':'否'">
                            	
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否可以登录后台</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].background_login_settings==true?'是':'否'">
                            	
                            </label>
                        </div>
                    </div>
                    <div class="form-group" ng-if="details[0].background_login_settings">
                        <label class="col-sm-4 control-label">用户名</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].username" >
                            {{details[0].username}}
                            </label>
                        </div>
                    </div>                    
                    <!--
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否使用餐柜</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].buffet_use_setting=='true'?'是':'否'">
                            	{{details[0].buffet_use_setting}}
                            </label>
                        </div>
                    </div>-->
                    <!--<div class="form-group">
                        <label class="col-sm-4 control-label">状态</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].is_enabled==true?'启用中':'停用中'">
                            {{details[0].is_enabled}}</label>
                        </div>
                    </div>-->
                    <div class="form-group" ng-if="details[0].background_login_settings">
                        <label class="col-sm-4 control-label">职级权限</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].role_name" >
                           
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label">部门</label>
                        <div class="col-sm-6">
                            <label class="control-label" style="text-align:left !important;width：100%" ng-bind="details[0].organization">
                            	{{details[0].organization}}
                            </label>
                        </div>
                    </div>
                </div> 
                
                <!-- /.box-body -->
                </form> 
            </div>
            <!-- /详情预览 -->
            <!-- 添加用户 -->
            <div class="box" ng-show="newUser_div" style="border: 0px;">
                <!-- box header -->
                <form class="form-horizontal">
                 <div class="box-header with-border">
                	<button class="btn btn-primary" ng-click="saveNewUser();" type="submit"><i class="fa fa-edit" ></i>&nbsp;保存</button>
                	<button class="btn btn-danger pull-right" ng-click="cancel()"><i class="fa fa-close"></i>&nbsp;取消</button>
                </div>
                
                <div class="box-body" style="height:400px;overflow:auto;overflow-x:hidden">
                    
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">姓名</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" placeholder="姓名" ng-model="onenewUser.name" required="required">
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">手机号</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" maxlength="11" placeholder="手机号" ng-model="onenewUser.telephone">
                        	<label style="color: #ff3d00;" ng-if="!isTel">请输入正确手机号&nbsp;<i class="fa fa-exclamation"></i></label>
                        </div>
                    </div>
                    <!--<div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">类型</label>
                        <div class="col-sm-8">
                            <select class="form-control select2 " style="width: 100%;" tabindex="-1" aria-hidden="true" ng-model="onenewUser.type" ng-required="true">
			                  <option value="0">内部用户</option>
			                  <option value="1">外部用户</option>
			                 </select>
                        </div>
                    </div>-->
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">是否为食堂员工</label>
                        <div class="col-sm-8">
                            <input class='tgl tgl-flat' id='internal_user' type='checkbox' ng-model="onenewUser.internal_user" >
    						<label class='tgl-btn' for='internal_user'></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">是否登录后台</label>
                        <div class="col-sm-8">
                            <input class='tgl tgl-flat' id='backstage' type='checkbox'  ng-model="onenewUser.background_login_settings" >
    						<label class='tgl-btn' for='backstage'></label>
                        </div>
                    </div>
                    <div class="form-group username" ng-if='onenewUser.background_login_settings'>
                        <label class="col-sm-4 control-label">用户名</label>
                        <div class="col-sm-8 ">
                            <input class="form-control " ng-model="onenewUser.username" ng-required='onenewUser.background_login_settings'>
                        	 <label style="color: #ff3d00; display: inline-block;">用户名为8位以内纯数字</label>
                        </div>
                    </div>
                    <div class="form-group psw" ng-if='onenewUser.background_login_settings'>
                        <label for="inputEmail3" class="col-sm-4 control-label">密码</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control pswinput" placeholder="密码" ng-model="onenewUser.password" ng-required='onenewUser.background_login_settings' maxlength="8">
                        	<label style="color: #ff3d00; display: inline-block;">密码仅限输入八位以内数字</label>
                        </div>
                    </div>
                    <!--<div class="form-group psw" ng-if='onenewUser.background_login_settings'> 
                        <label for="inputEmail3" class="col-sm-4 control-label">重复密码</label>
                        <div class="col-sm-8">
                            <input type="password" class="form-control pswinput" placeholder="重复密码" ng-model="onenewUser.confirm_password" ng-required='onenewUser.background_login_settings' >
                            <label style="color: red; display: none;" id="alertPsw">两次密码不一致！请重新输入</label>
                        </div>
                    </div>-->
                    
                    <!--<div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">状态设置</label>
                        <div class="col-sm-8">
                            <input class='tgl tgl-flat' id='status' type='checkbox' ng-model="onenewUser.type_setting">
    						<label class='tgl-btn' for='status'></label>
                        </div>
                    </div> -->
                    <div class="form-group" ng-if="onenewUser.background_login_settings">
                        <label for="inputEmail3" class="col-sm-4 control-label">权限级别</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" ng-click="showlevel()" id="checkedLevel" ng-model="onenewUser.rolenames" 
                            	onkeypress="javascript:return false" ng-required="true" readonly="readonly" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-4 control-label">部门</label>
                        <div class="col-sm-8">
                           <select class="form-control select2 " style="width: 100%;" tabindex="-1" aria-hidden="true" ng-model="onenewUser.organization_id" required="required">
			                  <option ng-repeat="dept in depts" value="{{dept.id}}">{{dept.name}}</option>
			               </select>
                        </div>
                    </div>
                    
                </div> 
                
                <!-- /.box-body -->
                </form> 
            </div>
          	<!-- /添加用户 -->
          	<!-- 编辑用户 -->
          	<div class="box" ng-show="edit_div" style="border: 0px;" >
                <!-- box header -->
                <form class="form-horizontal">
                 <div class="box-header with-border">
                	<button class="btn btn-primary" type="submit" ng-click="saveUserEdit(details[0].id)"><i class="fa fa-edit"></i>&nbsp;保存</button>
                	<button class="btn" ng-click="showdetail(details[0].id);" ng-show="userStatus"><i class="fa fa-lock"></i>&nbsp;取消</button>
                	<button class="btn btn-danger pull-right" ng-click="showDeleteUser(details[0].employee_code)"><i class="fa fa-close"></i>&nbsp;删除</button>
                </div>
                
                <div class="box-body" style="height:400px;overflow:auto;overflow-x:hidden" >
                    <div class="form-group">
                        <label class="col-sm-4 control-label">姓名</label>
                        <div class="col-sm-6">
                            <input class="form-control" ng-model="details[0].name" ng-required='true'>
                        </div>
                    </div>
                                       
                    <div class="form-group">
                        <label class="col-sm-4 control-label">手机号</label>
                        <div class="col-sm-6">
                        	<input class="form-control" ng-model="details[0].telephone" maxlength="11"> 
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否为食堂员工</label>
                        <div class="col-sm-8">
                            <input class='tgl tgl-flat' id='cangui' type='checkbox' ng-true-value="true" ng-false-value="false" ng-model="details[0].internal_user">
    						<label class='tgl-btn' for='cangui'></label>
                        </div>
                    </div>              
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否可以登录后台</label>
                        <div class="col-sm-8">
                            <input class='tgl tgl-flat' id='background_login_settings' type='checkbox' ng-true-value="true" ng-false-value="false" ng-model="details[0].background_login_settings">
    						<label class='tgl-btn' for='background_login_settings'></label>
                        </div>
                    </div>
                   <div class="form-group" ng-if="details[0].background_login_settings">
                        <label class="col-sm-4 control-label">用户名</label>
                        <div class="col-sm-6">
                            <input class="form-control" ng-model="details[0].username" ng-required='details[0].background_login_settings' >
                        	<label style="color: #ff3d00; display: inline-block;">用户名为8位以内纯数字</label>
                        </div>
                    </div> 
					<div class="form-group editpsw" ng-if="details[0].background_login_settings">
                        <label for="inputEmail3" class="col-sm-4 control-label">密码</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" placeholder="密码" ng-model="details[0].password" required="required" maxlength="8">
                        	<label style="color: #ff3d00; display: inline-block;">密码仅限输入八位以内数字</label>
                        </div>
                    </div>
                    <!--<div class="form-group editpsw" ng-if="details[0].background_login_settings">
                        <label for="inputEmail3" class="col-sm-4 control-label">重复密码</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" placeholder="重复密码" ng-model="details[0].confirm_password" required="required">
                        </div>
                    </div>-->
                    <div class="form-group" ng-if="details[0].background_login_settings">
                        <label class="col-sm-4 control-label">职级权限</label>
                        <div class="col-sm-6">
                            <input class="form-control" ng-model="details[0].role_name" ng-click="editlevels()" readonly/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label">部门</label>
                        <div class="col-sm-6">
                           <!--<select class="form-control select2 " style="width: 100%;" tabindex="-1" aria-hidden="true" ng-model="details[0].organization[0].id">-->
			                <!--<select class="form-control select2 " style="width: 100%;" tabindex="-1" aria-hidden="true" ng-model="details[0].organization[0].id">-->
			                <select class="form-control select2 " style="width: 100%;" tabindex="-1" aria-hidden="true" ng-model="details[0].organization_id">
			               	 	<option ng-repeat="dept in depts" value="{{dept.id}}" ng-selected="dept.id==details[0].organization_id">{{dept.name}}</option>
			               </select>
                          <!-- <input class="form-control" ng-model="details[0].organization[0].name" ng-click="userCheckDept();">-->
                        </div>
                    </div>
                </div> 
                
                <!-- /.box-body -->
                </form> 
            </div>
          	<!-- /编辑用户 -->
          </div>
          <!-- /.row -->
        </div>
        <!-- /.box-body -->
      </div>
      </div>
    </section>
    <!-- /.content -->
  </div>
<!-- 新增权限选择modal -->
 <div class="modal fade" id="level" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">选择权限级别</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
        <label ng-repeat="level in levels" style="margin-right: 12px;">
           	<input type="radio" id="{{level.id}}levels" class="chk_1 newlevel" name="level"  value="{{level.name}}" data-dataId = "{{level.id}}"/>
				<label for="{{level.id}}levels" class="checklable"></label>{{level.name}}
		</label>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="levelToHtml();">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /权限选择 -->
<!-- 编辑权限选择modal -->
 <div class="modal fade" id="editLevel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">选择权限级别</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
        <label ng-repeat="level in levels" style="margin-right: 12px;">
           	<input type="radio" id="{{level.id}}editpro" class="chk_1 editlevel" name="level" value="{{level.name}}" data-dataId = "{{level.id}}" ng-model="details[0].role_name"/>
				<label for="{{level.id}}editpro" class="checklable"></label>{{level.name}}
		</label>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="editlevelToHtml();">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /权限选择 -->
<!-- /..确定停用/启用用户modal -->
<div class="modal fade" id="stopOrOpen" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body" >
        <p id="showToggle"></p>
        <p class="hidden" id="hideCode"></p>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="setStatus()">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /..确定停用/启用用户modal -->
<!-- 单卡发卡modal -->
<div class="modal fade" id="sendOneCard" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">发卡</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body" >
        	<form class="form-horizontal">
                <div class="box-body">
                    <div class="form-group">
                        <label for="inputEmail3" class="col-sm-2 control-label">卡号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" ng-model="newCard.cardNo">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户姓名</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" ng-model="sendCardName" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户电话</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" ng-model="sendCardPhone" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">饭卡分类</label>
                        <div class="col-sm-10">
                            <select class="form-control">
                            	<option>1</option>
                            	<option>2</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">开卡交款</label>
                        <div class="col-sm-10">
                           <input type="text" class="form-control" ng-model="newCard.initialAmount">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">支付方式</label>
                        <div class="col-sm-10">
                           <select class="form-control" ng-model="newCard.paymentType">
                           	<option value="现金">现金</option>
                           	<option value="银行卡">银行卡</option>
                           </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">押金</label>
                        <div class="col-sm-10">
                           <input type="text" class="form-control" readonly ng-model="newCard.deposit">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">工本费</label>
                        <div class="col-sm-10">
                           <input type="text" class="form-control" readonly ng-model="newCard.expense">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">卡内余额</label>
                        <div class="col-sm-10">
                           <input type="text" class="form-control" readonly ng-model="newCard.yue">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">支付密码</label>
                        <div class="col-sm-10">
                           <input type="text" class="form-control" ng-model="newCard.paymentPassword">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">有效期至</label>
                        <div class="date col-sm-10">
			                  <input type="text" class="form-control" id="datepicker" ng-model="newCard.validDate">
			            </div>
                   </div>
                </div>
                <!-- /.box-body -->
                
                </form>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="sendCard()">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /单卡发卡 -->
<!-- 用户编辑选择组织结构modal -->
<div class="modal fade" id="deptForUser" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body" >
        	<div class="box box-default box-solid">
            <div class="box-header with-border btn">
              <h3 class="box-title">战车餐饮管理公司</h3>
			  <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                </button>
              </div>
              <!-- /.box-tools -->
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <ul class="nav nav-stacked">
                <li ng-repeat="dept in depts" ng-click="sureDept($event)"><a href="" class="btn"><i class="fa fa-fw fa-file-o"></i>{{dept.Name}}</a></li>
              </ul>
            </div>
            <!-- /.box-body -->
          </div>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="saveUserDept()">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /用户选择组织机构modal -->
<!-- 删除用户  -->
<div class="modal fade" id="deleteUser" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body" >
        	确定要删除该员工么？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="deleteUser()">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /删除用户 -->
<!-- 新增提示用户信息填写不全  -->
<div class="modal fade" id="newAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body" >
        	提交失败！请检查信息完整度后提交
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg col-md-4 col-md-offset-4" data-dismiss="modal">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- /新增提示用户信息填写不全 -->
<script>
$('#datepicker').datepicker({
    autoclose: true
  });

  	$('.pswinput').on('focus',function(){
   		$('.psw').removeClass('has-error')
		$('#alertPsw').hide()
   	})
</script>